<table class="layui-table">
    <colgroup>
        <col width="150">
        <col >
        <col >
        <col width="80">
        <col width="90">
        <col >
        <col >
        <col width="250">

    </colgroup>
    <thead>
    <tr>



        <th>客户</th>
        <th>订单号</th>
        <th>价格</th>
        <th>状态</th>
        <th>付款状态</th>
        <th>下单时间</th>
        <th>业务员</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>

    <?php

    if (count($orderlist) == 0) {
        echo "<tr><td colspan='6'>暂无数据</td></tr>";
    }

    ?>


    <?php
    for ($i = 0; $i < count($orderlist); $i++) {


        ?>

        <tr id="item<?echo $orderlist[$i]['nid']?>" >
            <td><? echo $orderlist[$i]['name']?></td>
            <td><? echo $orderlist[$i]['order_sn']?></td>
            <td><? echo $orderlist[$i]['price']?></td>
            <td><? echo $orderlist[$i]['status'];?></td>
            <td><span class="layui-btn layui-btn-xs layui-btn-radius <?if($orderlist[$i]['paystatus']!="已付款"){echo "layui-btn-danger";}?>"><? echo $orderlist[$i]['paystatus'];?></span></td>
            <td><? echo $orderlist[$i]['order_date']?></td>
            <td><? echo $emp_list[$orderlist[$i]['agent']]?></td>
            <td>

                <a href="../../order/view/detail-edit.php?nid=<?php echo $orderlist[$i]['nid']?>&sys_part=order"
                   class=" layui-btn  layui-btn-sm"  target="_blank">
                    <i class="fa fa-eye" aria-hidden="true"></i>详情</a>

                <?php
                if($orderlist[$i]['order_status'] == 0){?>
                    <a href="javascript:void(0)" onclick="canItem (<?php echo $orderlist[$i]['nid']?>)" class="delete layui-btn   layui-btn-sm cancel_order" ><i class="fa fa-stop-circle-o" aria-hidden="true"></i>取消 </a>
                <?php }?>


                <a class="layui-btn  layui-btn-sm" href="export.phpn=<?echo $orderlist[$i]['order_sn'] ?>"><i class="fa fa-file-excel-o" aria-hidden="true"></i>导出</a>

            </td>
        </tr>
        <?php

    }
    ?>
    </tbody>
</table>
